package nus.mtech.subscription;

import java.util.Date;

import nus.mtech.rate.DigitalVoiceRate;
import nus.mtech.rate.RateManager;
import nus.mtech.subscription.ExtraFeature.ExtraFeatureType;

/**
 * 
 */

/**
 * @author Chew Xunmao
 * 
 */
public class DigitalVoice extends Subscription {
	private static final long serialVersionUID = -1367326174145770994L;
	
	private Long telephoneNo;
	private ExtraFeature extraFeature;

	public DigitalVoiceRate getDvRate() {
		return RateManager.getRateManagerInstance().getDVRate();
	}

	public DigitalVoice(long telno, Date startDate, Date endDate) {
		this(telno, startDate, endDate, true);
	}

	public DigitalVoice(long telno, Date startDate, Date endDate, boolean status) {
		super(startDate, endDate, status);
		telephoneNo=telno;
	}

	public void setTelephoneNo(long telephoneNo) {
		this.telephoneNo = telephoneNo;
	}

	public ExtraFeature getExtraFeature() {
		return extraFeature;
	}

	public void setExtraFeature(Date commenceDate, Date endDate) {
		this.extraFeature = new ExtraFeature(ExtraFeatureType.CallTransfer,
				commenceDate, endDate);
	}
	public void setExtraFeature(Date commenceDate, Date endDate, boolean status) {
		this.extraFeature = new ExtraFeature(ExtraFeatureType.CallTransfer,
				commenceDate, endDate, status);
	}
	public void setExtraFeature(ExtraFeature ef){
		this.extraFeature=ef;
	}
	public long getTelephoneNo() {
		return telephoneNo;
	}

}
